package 网络编程;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class UdpSend {

	public static void main(String[] args) throws IOException {
		DatagramSocket ds = new DatagramSocket();
		BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));
		String line = null;
		while((line = buff.readLine()) != null){
			
			if("886".equals(line))
				break;
			
			byte[] buf = line.getBytes();
			DatagramPacket dp = 
					new DatagramPacket(buf,buf.length,InetAddress.getByName("192.168.1.104"),10001);
			ds.send(dp);
		}
		ds.close();
	}
}
